package com.gouaixin.bee.beeframework2.activity;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;

import com.gouaixin.bee.beeframework2.R;

/**
 * Created by Administrator on 2015/3/9.
 */

//特权服务
public class B4_tequanActivity extends Activity {
    Context context=B4_tequanActivity.this;

    //顶部
    ImageView back;//返回
    TextView title;//标题
    

    //内容
    RelativeLayout chuxiao;//促销活动
    LinearLayout faxinBaoyue;//发信包月
    LinearLayout vipTequan;//VIP特权
    LinearLayout yBi;//我的Y币
    ImageView libaoBg;//领取话费
    LinearLayout qqKefu;//QQ客服
    LinearLayout dianhuaKefu;//电话客服

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.b4_tequan);

        initHead();
        initContent();

    }

    /***
     *内容区域的监听
     */
    private void initContent() {
        chuxiao= (RelativeLayout) findViewById(R.id.chuxiao);
        faxinBaoyue= (LinearLayout) findViewById(R.id.faxinBaoyue);
        vipTequan= (LinearLayout) findViewById(R.id.vipTequan);
        yBi= (LinearLayout) findViewById(R.id.yBi);
        libaoBg= (ImageView) findViewById(R.id.libaoBg);
        qqKefu= (LinearLayout) findViewById(R.id.qqKefu);
        dianhuaKefu= (LinearLayout) findViewById(R.id.dianhuaKefu);


        chuxiao.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(context,"促销活动"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Intent it = new Intent().setClass(context, B10_chuxiaoActivity.class);
                startActivity(it);
            }
        });



        faxinBaoyue.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Toast.makeText(context,"发信包月"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Intent it = new Intent().setClass(context, B15_faxinBaoyueActivity.class);
                startActivity(it);
            }
        });

        vipTequan.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Toast.makeText(context,"VIP特权"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Intent it = new Intent().setClass(context, B14_vipTequanActivity.class);
                startActivity(it);
            }
        });

        yBi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
//                Toast.makeText(context,"我的Y币"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Intent it = new Intent().setClass(context, B13_yBiActivity.class);
                startActivity(it);
            }
        });

        libaoBg.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(context,"领取话费"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Intent it = new Intent().setClass(context, B17_shoujiYanzhengActivity.class);
                it.putExtra("title","验证手机领取话费");
                startActivity(it);
            }
        });

        qqKefu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(context,"QQ客服"+"功能正在开发中",Toast.LENGTH_SHORT).show();
            }
        });

        dianhuaKefu.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Toast.makeText(context,"电话客服"+"功能正在开发中",Toast.LENGTH_SHORT).show();
                Uri uri = Uri.parse("tel:13419527681");
                Intent it = new Intent(Intent.ACTION_DIAL, uri);
                startActivity(it);





            }
        });





    }


    /***
     *顶部的监听
     */
    private void initHead() {
        back= (ImageView) findViewById(R.id.back);
        back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });


    }




}
